package cn.szzsi.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

/**
 * Created by admin on 2017/5/20.
 */
public class TokenInterceptor implements Interceptor {
    @Override
    public void intercept(Invocation inv) {
        boolean token = com.jfinal.token.TokenManager.validateToken(inv.getController(), "jockillerToken");
        if(!token){
            inv.invoke();
        }else{
            inv.getController().renderText("请不要重复提交");
        }
    }

}
